
//删除提示
function deleteCon(msg , func, args){
    var html='';
    html+='<div id="pop-con">';
    html+='<div class="pop-up">';
    html+='<div class="delete-con">';
    html+='<div>';
    html+='<div><img src="../static/img/icon_hint.png">是否要删除此数据？</div>';
    html+='<p>删除后将无法恢复，请确认是否要删除这条数据。</p>';
    html+='</div>';
    html+='<div class="btn-con textCenter">';
    html+='<span class="btn-one" style="cursor: pointer;">取&nbsp;消</span>';
    html+='<span class="btn-two" style="cursor: pointer;">确&nbsp;定</span>';
    html+='</div>';
    html+='</div>';
    html+='</div>';
    html+='</div>';
    layui.use(['element', 'layer'], function() {
        var element = layui.element;
        var layer = layui.layer;
        var indexview = layer.open({
            type: 1
            ,title: false //不显示标题栏
            ,closeBtn: false
            //新建组织
            ,area: ['','']
            ,shade: 0.6
            ,id: 'delete' //设定一个id，防止重复弹出
            /*,btn: ['确认支付']*/
            ,btnAlign: 'c'
            ,moveType: 1 //拖拽模式，0或者1
            ,shadeClose: true //设置允许点遮罩关闭
            ,content: html,
            success:function(){
                $(".btn-one").unbind().click(function () {
                    layer.close(indexview);
                })
                $(".btn-cancel-all").unbind().click(function() {
                    layer.closeAll();
                });
                $(".btn-two").unbind().click(function () {
                    layer.closeAll();
                    var str = "func(";
                    for (var i=0;i<args.length;i++)
                    {
                        if(i+1==args.length){
                            str+="args["+i+"]";
                        }else {
                            str+="args["+i+"],";
                        }
                    }
                    str+=")";
                    eval(str);
                })
            },
        });
    });
}

//确认提示
function confirmCon(msg , func, args){
    // console.log("confirmCon in");
    // console.log("args="+args);
    // console.log("type="+type);
    var html='';
    html+='<div id="pop-con">';
    html+='<div class="pop-up">';
    html+='<div class="confirm-con">';
    html+='<div>';
    html+='<div style="margin-bottom: 20px;"><img src="../static/img/icon_hint.png">'+msg+'</div>';
    html+='</div>';
    html+='<div class="btn-con textCenter">';
    html+='<span id="confirmCancel" style="cursor: pointer;" class="btn-one">取&nbsp;消</span>';
    html+='<span id="confirmCommit" style="cursor: pointer;" class="btn-two">确&nbsp;定</span>';
    html+='</div>';
    html+='</div>';
    html+='</div>';
    html+='</div>';

    layui.use(['element', 'layer'], function() {
        var element = layui.element;
        var layer = layui.layer;
        var indexview=layer.open({
            type: 1
            ,title: false //不显示标题栏
            ,closeBtn: false
            //新建组织
            ,area: ['','']
            ,shade: 0.6
            ,id: 'confirm' //设定一个id，防止重复弹出
            /*,btn: ['确认支付']*/
            ,btnAlign: 'c'
            ,moveType: 1 //拖拽模式，0或者1
            ,shadeClose: true //设置允许点遮罩关闭
            ,content: html,
            success:function(){
                //关闭弹层
                // $(".pop-close").click(function(){
                //     layer.closeAll();
                // });
                $(".btn-one").unbind().click(function () {
                    layer.close(indexview);
                })
                $(".btn-cancel-all").unbind().click(function() {
                    layer.closeAll();
                });
                $(".btn-two").unbind().click(function () {
                    layer.closeAll();
                    var str = "func(";
                    for (var i=0;i<args.length;i++)
                    {
                        if(i+1==args.length){
                            str+="args["+i+"]";
                        }else {
                            str+="args["+i+"],";
                        }
                    }
                    str+=")";
                    eval(str);
                })
            },
        });
    });
}

//无数据提示
function noDataCon(){
    var html='';
    html+='<div id="pop-con">';
    html+='<div class="pop-up">';
    html+='<div class="nodata-con">';
    html+='<div>';
    html+='<div style="text-align: center;"><img style="width:250px;height:250px;" src="./static/img/no_plat_data.png"></div>';
    html+='<p style="margin-top:30px;margin-bottom: 10px;font-size: 16px">您未开通此应用功能，请联系管理员开通</p>';
    html+='</div>';
    html+='<div class="btn-con textCenter">';
    html+='</div>';
    html+='</div>';
    html+='</div>';
    html+='</div>';
    layui.use(['element', 'layer'], function() {
        var element = layui.element;
        var layer = layui.layer;
        var indexview = layer.open({
            type: 1
            ,title: false //不显示标题栏
            ,closeBtn: false
            //新建组织
            ,area: ['','']
            ,shade: 0.6
            ,id: 'nodata' //设定一个id，防止重复弹出
            /*,btn: ['确认支付']*/
            ,btnAlign: 'c'
            ,moveType: 1 //拖拽模式，0或者1
            ,shadeClose: true //设置允许点遮罩关闭
            ,content: html,
            success:function(){
                $(".btn-one").unbind().click(function () {
                    layer.close(indexview);
                })
                $(".btn-cancel-all").unbind().click(function() {
                    layer.closeAll();
                });
                $(".btn-two").unbind().click(function () {
                    layer.closeAll();
                })
            },
        });
    });
}
